<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <!--[if lt IE 9]>
<script type="text/javascript" src="../lib/html5.js"></script>
<script type="text/javascript" src="../lib/respond.min.js"></script>
<script type="text/javascript" src="../lib/PIE_IE678.js"></script>
<![endif]-->
    <link href="../css/H-ui.min.css" rel="stylesheet" type="text/css" />
    <link href="../css/H-ui.admin.css" rel="stylesheet" type="text/css" />
    <link href="../lib/icheck/icheck.css" rel="stylesheet" type="text/css" />
    <link href="../lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" type="text/css" />
    <!--[if IE 6]>
<script type="text/javascript" src="../lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->

    <title>添加用户</title>
    <!--  城市下拉查找>>>>>>>>>>>>>>>>>>-->
    <style type="text/css">
        #suggest, #suggest2 {
            width: 200px;
        }

        #suggest, #suggest2 {
            width: 200px;
        }

        .gray {
            color: gray;
        }

        .ac_results {
            background: #fff;
            border: 1px solid #7f9db9;
            position: absolute;
            z-index: 10000;
            display: none;
        }

            .ac_results li a {
                white-space: nowrap;
                text-decoration: none;
                display: block;
                color: #05a;
                padding: 1px 3px;
            }

            .ac_results li {
                border: 1px solid #fff;
            }

                .ac_over, .ac_results li a:hover {
                    background: #c8e3fc;
                }

                .ac_results li a span {
                    float: right;
                }

        .ac_result_tip {
            border-bottom: 1px dashed #666;
            padding: 3px;
        }
    </style>
    <!--  城市下拉查找>>>>>>>>>>>>>>>>>>-->
</head>
<body>


    <div class="pd-20">

        <form id="itemEdit" name="itemEdit" method="post" action="../ashx/spui.ashx" class="form form-horizontal">
            <input type="hidden" class="actionValue" id="editAction" name="action" value="add" />
            <input type="hidden" id="id" name="id" />
            <input type="hidden" id="tablename" name="tablename" value="" />
            <input type="hidden" id="tablemidname" name="tablemidname" value="" />
            <input type="hidden" id="ftype" name="ftype" value="20150921" />

            <div class="row cl">
                <label class="form-label col-1"><span class="c-red">*</span>用户名：</label>
                <div class="formControls col-2">

                    <input type="text" class="input-text" placeholder="4~16个字符，字母/中文/数字/下划线" name="ffv1" id="ffv1" datatype="*4-16" nullmsg="用户名不能为空" />
                </div>
                <div class="col-2"></div>
                <label class="form-label col-1">别名：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" name="ffv2" id="ffv2" />
                </div>
                <div class="col-2"></div>
            </div>

            <div class="row cl">
                <label class="form-label col-1">邮箱：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" ignore="ignore" placeholder="@" name="ffv3" id="ffv3" datatype="e" />
                </div>
                <div class="col-2"></div>
                <label class="form-label col-1">账号：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" autocomplete="off" ignore="ignore" placeholder="手机/邮箱" name="ffv4" id="ffv4" datatype="m|e" />
                </div>
                <div class="col-2"></div>
            </div>
            <div class="row cl">
                <label class="form-label col-1">密码：</label>
                <div class="formControls col-2">
                    <input type="password" class="input-text" autocomplete="off" placeholder="密码" name="password1" id="password1" datatype="*6-18" />
                </div>
                <div class="col-2"></div>
                <label class="form-label col-1">密码验证：</label>
                <div class="formControls col-2">
                    <input type="password" class="input-text" autocomplete="off" placeholder="密码" name="ffv5" id="ffv5" recheck="password1" datatype="*6-18" nullmsg="请再输入一次密码！" errormsg="您两次输入的密码不一致！" />
                </div>
                <div class="col-2"></div>
            </div>
            <div class="row cl">

                <label class="form-label col-1">下拉查找：</label>
               <div class="formControls col-2">
                    <input class="input-text" type="text" name="arrcity" id="arrcity"  />
                    <div id="suggest" class="ac_results" style="margin-top: 0px;position:fixed;"></div>

               </div>
                <div class="col-2"></div>
                <label class="form-label col-1"></label>
                <div class="formControls col-2">
                </div>
                <div class="col-2"></div>
            </div>
            <div class="row cl">
                <label class="form-label col-1">单选性别：</label>
                <div class="formControls  skin-minimal col-7">
                    <div class="radio-box">
                        <input type="radio" id="ffv6" name="ffv6" value="男" class="hcradio" />
                        <label for="ffv6-1">男</label>
                    </div>
                    <div class="radio-box">
                        <input type="radio" id="ffv62" name="ffv6" value="女" />
                        <label for="ffv6-2">女</label>
                    </div>
                    <div class="radio-box">
                        <input type="radio" id="ffv63" name="ffv6" value="保密" />
                        <label for="ffv6-3">保密</label>
                    </div>
                </div>
                <div class="col-2"></div>
            </div>
            <div class="row cl">
                <label class="form-label col-1">多选爱好：</label>
                <!--这个要加上-->
                <input type="checkbox" id="ffv7" name="ffv7" value="checked" checked="checked" class="hccheckbox" style="display: none;" />
                <div class="formControls  skin-minimal  col-7">
                    <div class="check-box">
                        <input type="checkbox" id="ffv71" name="ffv7" value="上网" />
                        <label for="ffv7-1">上网</label>
                    </div>
                    <div class="check-box">
                        <input type="checkbox" id="ffv7-2" name="ffv7" value="摄影" />
                        <label for="ffv7-2">摄影</label>
                    </div>
                </div>
                <div class="col-2"></div>
            </div>
            <div class="row cl">
                <label class="form-label col-1">年龄：</label>
                <div class="formControls col-2">
                    <input type="text" value="" name="fnv1" id="fnv1" class="input-text" datatype="n1-3" ignore="ignore" nullmsg="请填写您的年龄！" errormsg="年龄为 1~3 位数字！" />
                </div>
                <div class="col-2"></div>
                <label class="form-label col-1">生日：</label>
                <div class="formControls col-2">
                    <input type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" id="fdt1" name="fdt1" datatype="*4-26" class="input-text Wdate" nullmsg="请填写您的生日！" />
                </div>
                <div class="col-2"></div>
            </div>

            <div class="row cl">
                <label class="form-label col-1">开始：</label>
                <div class="formControls col-2">
                    <input type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',maxDate:'#F{$dp.$D(\'fdt3\')||\'%y-%M-%d\'}'})" id="fdt2" name="fdt2" class="input-text Wdate" />
                </div>
                <div class="col-2"></div>
                <label class="form-label col-1">结束：</label>
                <div class="formControls col-2">
                    <input type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'fdt2\')}'})" id="fdt3" name="fdt3" class="input-text Wdate" />
                </div>
                <div class="col-2"></div>
            </div>
            <div class="row cl">
                <label class="form-label col-1">下拉：</label>
                <div class="formControls col-2">
                    <span class="select-box">
                        <select class="select" size="1" name="ffv8" id="ffv8" datatype="*" nullmsg="请选择所在城市！">
                            <option value="" selected>请选择城市</option>
                            <option value="1">北京</option>
                            <option value="2">上海</option>
                            <option value="3">广州</option>
                        </select>
                    </span>
                </div>
                <div class="col-2"></div>
                <label class="form-label col-1">动态机构：</label>
                <div class="formControls col-2">
                    <span class="select-box">
                        <select class="select" size="1" name="ffv9" id="ffv9">
                        </select>
                    </span>
                </div>
                <div class="col-2"></div>
            </div>
            <div class="row cl">
                <label class="form-label col-1">连动部门：</label>
                <div class="formControls col-2">
                    <span class="select-box">
                        <select class="select" size="1" name="ffv10" id="ffv10">
                        </select>
                    </span>
                </div>
                <div class="col-2"></div>
                <label class="form-label col-1">连动人员：</label>
                <div class="formControls col-2">
                    <span class="select-box">
                        <select class="select" size="1" name="fnv2" id="fnv2">
                        </select>
                    </span>
                </div>
                <div class="col-2"></div>
            </div>




            <div class="row cl">
                <div class="col-6 col-offset-4">
                    <!--  <a  class="btn btn-primary radius" href="javascript:void(0)" onclick="javascript:baseSubmit();">提交</a>-->
                    <button class="btn btn-primary radius" type="submit" id="btsub1">提交1</button>&nbsp;&nbsp;
                    <button class="btn btn-primary radius" type="submit" id="btsub2">提交2</button>&nbsp;&nbsp;
				<button class="btn btn-secondary radius" type="button" id="btn_reset">重置</button>&nbsp;&nbsp;
				<button onclick="layer_close();" class="btn btn-default radius" type="button">返回</button>
                </div>
            </div>
        </form>
    </div>
    <script src="../hcjsui/Scripts/jquery-1.9.1.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="../lib/icheck/jquery.icheck.min.js"></script>
    <script type="text/javascript" src="../lib/Validform/5.3.2/Validform.js"></script>
    <script type="text/javascript" src="../lib/layer/1.9.3/layer.js"></script>
    <script src="../hcjsui/js/_Define.js" type="text/javascript"></script>
    <script type="text/javascript" src="../js/hcui.js"></script>
    <script type="text/javascript" src="../js/hcui_au.js"></script>
    <script type="text/javascript" src="../lib/My97DatePicker/WdatePicker.js"></script>
    <!--  城市下拉查找>>>>>>>>>>>>>>>>>>-->
    <script type="text/javascript" src="jsforsel/airCity.js"></script>
    <script type="text/javascript" src="jsforsel/dimensions.js"></script>
    <script type="text/javascript" src="jsforsel/suggest.js"></script>
    <!--  城市下拉查找>>>>>>>>>>>>>>>>-->
    <script type="text/javascript">
        //加载处理
        function loadin() {
            //本页面 
            spsetBaseNoBt("Table_SP", "id", "Table_SP as T", "*", "", "newui", "表单控件测试", "newui");
            //加载
            hcdosel("BranchID as id  ,BranchName as name", "mrBranch", "type in('本部')", "", "", "BranchID", function (data) {
                SetSelectWithObjIdName("#ffv9", data);
            });
            //连动
            $('#ffv9').change(function () {
                loadDepInfo($(this).children('option:selected').val());
            });
            $('#ffv10').change(function () {
                loadUserInfo($(this).children('option:selected').val());
            });
            $("#arrcity").suggest(citys, { hot_list: commoncitys, attachObject: '#suggest' });
            // $("#city2").suggest(citys, { hot_list: commoncitys, attachObject: "#suggest2" });

        }
        //编辑数据，加载后回调
        function loadback(data) {
            loadDepInfo(data["fv9"], data["fv10"]);
            loadUserInfo(data["fv10"], data["nv2"]);
        }
        //加载部门
        function loadDepInfo(id, selid) {
            if (id == "") return;
            hcdosel("DepID as id  ,DepName as name", "mrDepartment", "BranchID=" + id, "", "", "BranchID,DepID", function (data) {
                SetSelectWithObjIdName("#ffv10", data);
                if (selid) $("#ffv10").val(selid);
            });
        }
        //加载人员
        function loadUserInfo(id, selid) {
            if (id == "") return;
            hcdosel("EmpID as id  ,EmpName as name", "mrBaseInf", "DepID=" + id, "", "", "DepID,EmpID", function (data) {
                SetSelectWithObjIdName("#fnv2", data);
                if (selid) $("#fnv2").val(selid);
            });
        }
    </script>
</body>
</html>
